"""
双色球选号
玩家需要从1-33的红色球中选择6个号码，从1-16的蓝色球中选择1个号码作为特殊号码。

Version: 0.1
Author: yuwl
Date：2024-3-19
"""
from random import randrange, randint, sample

def random_select():
    red_balls = [x for x in range(1, 34)]
    selected_balls = []
    selected_balls = sample(red_balls, 6)
    selected_balls.sort()
    selected_balls.append(randint(1, 16))
    return selected_balls

def display(balls):
    for x in range(len(balls)):
        if(x == len(balls) - 1):
            print('|', balls[x], end='')
        else:
            print(balls[x], ' ', end='')

display(random_select())

print()